//
// Created by icezhang on 2021/9/8.
//

#include "MqttSingleton.h"

#include "string"
void MqttSingleton::doSomething() {

    pubmsg.payload = (void *) PAYLOAD;
    pubmsg.payloadlen = strlen(PAYLOAD);
    pubmsg.qos = QOS;
    pubmsg.retained = 0;
    MQTTClient_publishMessage(client, TOPIC, &pubmsg, &token);
    rc = MQTTClient_waitForCompletion(client, token, TIMEOUT);
    printf("Message with delivery token %d delivered\n", token);
}